package wh.coach._class;

/**
 * @author hangwen
 * @date 2023/6/20
 */
public class Main {
    public static void main(String[] args) {
        Base base = new Base();
        Sub1 sub = new Sub1();

        System.out.println(base.getName());
        System.out.println(sub.getName());

        base = new Base("base1");
        sub = new Sub1("base1");

        System.out.println(base.getName());
        System.out.println(sub.getName());

        System.out.println(Base.getNAME());
        System.out.println(Sub1.getNAME());

        //包内可访问
        base.getPackageName();
        //保护级别 保内可访问
        base.getProtectedName();
    }
}
